#include <iostream>
#include <vector>
#include <queue>

using namespace std;

vector<int> maxSlidingWindow(vector<int>& nums, int k) {
    priority_queue<pair<int, int>> heap;
    for (int i = 0; i < k; ++i)
        heap.emplace(nums[i], i);

    vector<int> ret;
    ret.push_back(heap.top().first);

    for (int i = k; i < nums.size(); ++i)
    {
        heap.emplace(nums[i], i);
        while (heap.top().second <= i - k)
            heap.pop();

        ret.push_back(heap.top().first);
    }

    return ret;
}

int main()
{

	return 0;
}